<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="/WEB-INF/tlds/nodes-faces.tld" prefix="n" %>

<f:subview id="dataApplets">

    <jsp:directive.include file="template/applet.jsp"/>
    <jsp:directive.include file="instance/applet.jsp"/>
    <jsp:directive.include file="ac/applet.jsp"/>

    <%-- New node --%>
    <h:panelGroup id="newNode" layout="block" style="display:inline" rendered="#{NodesBean.appletSubstitution}"/>
    <n:applet generateCode="newNode"
        code="offset.nodes.client.dialog.newnode.view.NewNodeApplet" codebase="#{NodesBean.contextPath}" jar="dialog.jar"
        width="0" height="0" rendered="#{NodesBean.appletSubstitution}">
        <f:param name="service" value="#{NodesBean.dialogPath}"/>
        <f:param name="base" value="#{NodesBean.repositoryPath}"/>
        <f:param name="path" value="#{PathBean.path}"/>
        <f:param name="configFiles" value="#{NodesBean.clientConfigFiles}"/>
    </n:applet>

    <n:applet rendered="#{!nodesBean.appletSubstition && DataBean.components.new.rendered}"
              code="offset.nodes.client.dialog.newnode.view.NewNodeApplet" codebase="#{NodesBean.contextPath}" jar="dialog.jar"
              width="0" height="0">
        <f:param name="service" value="#{NodesBean.dialogPath}"/>
        <f:param name="base" value="#{NodesBean.repositoryPath}"/>
        <f:param name="path" value="#{PathBean.path}"/>
    </n:applet>

    <%-- Move --%>
    <h:panelGroup id="move" layout="block" style="display:inline" rendered="#{NodesBean.appletSubstitution}"/>
    <n:applet generateCode="move"
              code="offset.nodes.client.dialog.chooser.view.MoveNodeApplet" codebase="#{NodesBean.contextPath}" jar="dialog.jar"
              width="0" height="0" rendered="#{NodesBean.appletSubstitution}">
        <f:param name="service" value="#{NodesBean.dialogPath}"/>
        <f:param name="path" value="#{PathBean.path}"/>
        <f:param name="root" value="#{PathBean.path}"/>
        <f:param name="filter" value="*"/>
        <f:param name="onlyFolders" value="true"/>
        <f:param name="repository" value="#{NodesBean.repositoryPath}"/>
    </n:applet>

    <n:applet rendered="#{!NodesBean.appletSubstitution && DataBean.components.move.rendered}"
              code="offset.nodes.client.dialog.chooser.view.MoveNodeApplet" codebase="#{NodesBean.contextPath}" jar="dialog.jar"
              width="0" height="0">
        <f:param name="service" value="#{NodesBean.dialogPath}"/>
        <f:param name="path" value="#{PathBean.path}"/>
        <f:param name="root" value="#{PathBean.path}"/>
        <f:param name="filter" value="*"/>
        <f:param name="onlyFolders" value="true"/>
        <f:param name="repository" value="#{NodesBean.repositoryPath}"/>
    </n:applet>

    <%-- Copy --%>
    <h:panelGroup id="copy" layout="block" style="display:inline" rendered="#{NodesBean.appletSubstitution}"/>
    <n:applet generateCode="copy"
              code="offset.nodes.client.dialog.chooser.view.CopyNodeApplet" codebase="#{NodesBean.contextPath}" jar="dialog.jar"
              width="0" height="0" rendered="#{NodesBean.appletSubstitution}">
        <f:param name="service" value="#{NodesBean.dialogPath}"/>
        <f:param name="path" value="#{PathBean.path}"/>
        <f:param name="root" value="#{PathBean.path}"/>
        <f:param name="filter" value="*"/>
        <f:param name="onlyFolders" value="true"/>
        <f:param name="repository" value="#{NodesBean.repositoryPath}"/>
    </n:applet>

    <n:applet rendered="#{!NodesBean.appletSubstitution && DataBean.components.copy.rendered}"
              code="offset.nodes.client.dialog.chooser.view.CopyNodeApplet" codebase="#{NodesBean.contextPath}" jar="dialog.jar"
              width="0" height="0">
        <f:param name="service" value="#{NodesBean.dialogPath}"/>
        <f:param name="path" value="#{PathBean.path}"/>
        <f:param name="root" value="#{PathBean.path}"/>
        <f:param name="filter" value="*"/>
        <f:param name="onlyFolders" value="true"/>
        <f:param name="repository" value="#{NodesBean.repositoryPath}"/>
    </n:applet>

    <%-- Order --%>
    <h:panelGroup id="order" layout="block" style="display:inline" rendered="#{NodesBean.appletSubstitution}"/>
    <n:applet generateCode="order"
              code="offset.nodes.client.dialog.chooser.view.OrderNodesApplet" codebase="#{NodesBean.contextPath}" jar="dialog.jar"
              width="0" height="0" rendered="#{NodesBean.appletSubstitution}">
        <f:param name="service" value="#{NodesBean.dialogPath}"/>
        <f:param name="path" value="#{PathBean.path}"/>
        <f:param name="repository" value="#{NodesBean.repositoryPath}"/>
    </n:applet>

    <n:applet rendered="#{!NodesBean.appletSubstitution && DataBean.components.order.rendered}"
              code="offset.nodes.client.dialog.chooser.view.OrderNodesApplet" codebase="#{NodesBean.contextPath}" jar="dialog.jar"
              width="0" height="0">
        <f:param name="service" value="#{NodesBean.dialogPath}"/>
        <f:param name="path" value="#{PathBean.path}"/>
        <f:param name="repository" value="#{NodesBean.repositoryPath}"/>
    </n:applet>

    <%-- Remove --%>
    <h:panelGroup id="remove" layout="block" style="display:inline" rendered="#{NodesBean.appletSubstitution}"/>
    <n:applet generateCode="remove"
              code="offset.nodes.client.dialog.remove.view.RemoveNodeApplet" codebase="#{NodesBean.contextPath}" jar="dialog.jar"
              width="0" height="0" rendered="#{NodesBean.appletSubstitution}">
        <f:param name="service" value="#{NodesBean.dialogPath}"/>
        <f:param name="path" value="#{PathBean.path}"/>
        <f:param name="repository" value="#{NodesBean.repositoryPath}"/>
    </n:applet>

    <n:applet rendered="#{!NodesBean.appletSubstitution && DataBean.components.remove.rendered}"
              code="offset.nodes.client.dialog.remove.view.RemoveNodeApplet" codebase="#{NodesBean.contextPath}" jar="dialog.jar"
              width="0" height="0">
        <f:param name="service" value="#{NodesBean.dialogPath}"/>
        <f:param name="path" value="#{PathBean.path}"/>
        <f:param name="repository" value="#{NodesBean.repositoryPath}"/>
    </n:applet>

    <%-- Export file --%>
    <h:panelGroup id="exportFile" layout="block" style="display:inline" rendered="#{NodesBean.appletSubstitution && DataBean.file}"/>
    <n:applet generateCode="exportFile"
              code="offset.nodes.client.dialog.io.controller.ExportFileApplet" codebase="#{NodesBean.contextPath}" jar="dialog.jar"
              width="0" height="0" rendered="#{NodesBean.appletSubstitution && DataBean.file}">
        <f:param name="service" value="#{NodesBean.dialogPath}"/>
        <f:param name="path" value="#{PathBean.path}"/>
        <f:param name="repository" value="#{NodesBean.repositoryPath}"/>
    </n:applet>

    <n:applet rendered="#{!NodesBean.appletSubstitution && DataBean.components.exportFile.rendered}"
              code="offset.nodes.client.dialog.io.controller.ExportFileApplet" codebase="#{NodesBean.contextPath}" jar="dialog.jar"
              width="0" height="0">
        <f:param name="service" value="#{NodesBean.dialogPath}"/>
        <f:param name="path" value="#{PathBean.path}"/>
        <f:param name="repository" value="#{NodesBean.repositoryPath}"/>
    </n:applet>

    <%-- Export --%>
    <h:panelGroup id="exportRepositoryNode" layout="block" style="display:inline" rendered="#{NodesBean.appletSubstitution}"/>
    <n:applet generateCode="exportRepositoryNode"
              code="offset.nodes.client.dialog.io.controller.ExportApplet" codebase="#{NodesBean.contextPath}" jar="dialog.jar"
              width="0" height="0" rendered="#{NodesBean.appletSubstitution}">
        <f:param name="service" value="#{NodesBean.dialogPath}"/>
        <f:param name="path" value="#{PathBean.path}"/>
        <f:param name="repository" value="#{NodesBean.repositoryPath}"/>
    </n:applet>

    <n:applet rendered="#{!NodesBean.appletSubstitution && DataBean.components.export.rendered}"
              code="offset.nodes.client.dialog.io.controller.ExportApplet" codebase="#{NodesBean.contextPath}" jar="dialog.jar"
              width="0" height="0">
        <f:param name="service" value="#{NodesBean.dialogPath}"/>
        <f:param name="path" value="#{PathBean.path}"/>
        <f:param name="repository" value="#{NodesBean.repositoryPath}"/>
    </n:applet>

    <%-- Import --%>
    <h:panelGroup id="importRepositoryNode" layout="block" style="display:inline" rendered="#{NodesBean.appletSubstitution}"/>
    <n:applet generateCode="importRepositoryNode"
              code="offset.nodes.client.dialog.io.controller.ImportApplet" codebase="#{NodesBean.contextPath}" jar="dialog.jar"
              width="0" height="0" rendered="#{NodesBean.appletSubstitution}">
        <f:param name="service" value="#{NodesBean.dialogPath}"/>
        <f:param name="path" value="#{PathBean.path}"/>
        <f:param name="repository" value="#{NodesBean.repositoryPath}"/>
    </n:applet>

    <n:applet rendered="#{!NodesBean.appletSubstitution && DataBean.components.import.rendered}"
              code="offset.nodes.client.dialog.io.controller.ImportApplet" codebase="#{NodesBean.contextPath}" jar="dialog.jar"
              width="0" height="0">
        <f:param name="service" value="#{NodesBean.dialogPath}"/>
        <f:param name="path" value="#{PathBean.path}"/>
        <f:param name="repository" value="#{NodesBean.repositoryPath}"/>
    </n:applet>

</f:subview>
